﻿<%@ Page Title="" Language="C#" MasterPageFile="~/skin.Master" AutoEventWireup="true" CodeBehind="XunYue.aspx.cs" Inherits="DataShow.XunYue" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<asp:Content ID="Content1" ContentPlaceHolderID="home_header" runat="server">
    <link href="/fileupload/uploadify.css" rel="stylesheet" />
    <style type="text/css">
        .page-header {
            margin-bottom: 1px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cph_home" runat="server">
    <div style="margin-top: 10px;">
        <ul class="breadcrumb">
            <li><a href="<%:IndexUrl %>">首页</a> <span class="divider">/</span></li>
            <li class="active">旬月数据</li>
        </ul>
    </div>
    <div class="row-fluid">
        <div class="span12">
            <div class="widget-box">
                <div class="widget-title">
                    <span class="icon">
                        <i class="icon-plus"></i>
                    </span>
                    <h5>功能栏</h5>
                </div>
                <div class="widget-content nopadding">
                    <button class="btn btn-primary" data-toggle="modal" data-target="#myModal" id="btn_add_">新增</button>
                    <button class="btn btn-primary" data-toggle="modal" data-target="#modal_import">
                        导入
                    </button>
                    <asp:Button runat="server" ID="btn_check_all" Text="全选" CssClass="btn-primary btn" OnClick="btn_check_all_Click" />
                    <asp:Button runat="server" ID="btn_deleete_checked" Text="删除选中" CssClass="btn-primary btn" OnClick="btn_deleete_checked_Click" />
                    <div class="input-append pull-right">
                        <asp:CheckBox runat="server" ID="cbx_by_month" Checked="false" />
                        <label style="display: inline-block; padding-top: 5px;">月份：</label>
                        <asp:DropDownList runat="server" ID="ddl_month_search" Height="30">
                            <asp:ListItem Text="1" Value="01" />
                            <asp:ListItem Text="2" Value="02" />
                            <asp:ListItem Text="3" Value="03" />
                            <asp:ListItem Text="4" Value="04" />
                            <asp:ListItem Text="5" Value="05" />
                            <asp:ListItem Text="6" Value="06" />
                            <asp:ListItem Text="7" Value="07" />
                            <asp:ListItem Text="8" Value="08" />
                            <asp:ListItem Text="9" Value="09" />
                            <asp:ListItem Text="10" Value="10" />
                            <asp:ListItem Text="11" Value="11" />
                            <asp:ListItem Text="12" Value="12" />
                        </asp:DropDownList>
                        <asp:Button runat="server" ID="btn_search" Text="搜索" CssClass="btn" OnClick="btn_search_Click" />
                    </div>

                </div>
            </div>
        </div>
    </div>
    <div class="row-fluid">
        <div class="span12">
            <div class="widget-box" style="margin-top: 0">
                <div class="widget-title">
                    <span class="icon">
                        <i class="icon-plus"></i>
                    </span>
                    <h5>搜索结果</h5>
                </div>
                <div class="widget-content nopadding">
                    <asp:GridView ID="gv_result" runat="server" AutoGenerateColumns="False" BorderWidth="0" EmptyDataText="暂无排班表" CssClass="table" GridLines="None" OnRowDataBound="gv_result_RowDataBound">
                        <Columns>
                            <asp:TemplateField HeaderText="ID" HeaderStyle-CssClass="w15" Visible="false">
                                <ItemTemplate>
                                    <asp:Label ID="ID" runat="server" Text='<%#Eval("id") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="选择">
                                <ItemTemplate>
                                    <asp:CheckBox runat="server" ID="Select" Checked="false" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="月份" HeaderStyle-CssClass="w15">
                                <ItemTemplate>
                                    <asp:Label ID="labdate" runat="server"><%#Eval("month") %></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="类型" HeaderStyle-CssClass="w15">
                                <ItemTemplate>
                                    <asp:Label ID="labtype" runat="server"><%#GetXun(Eval("xun").ToString()) %></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="内容" HeaderStyle-CssClass="w15">
                                <ItemTemplate>
                                    <asp:Label ID="labName" runat="server"><%#Eval("content") %></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="操作" HeaderStyle-CssClass="w40">
                                <ItemTemplate>
                                    <asp:LinkButton runat="server" ID="btn_edit" CssClass="btn_edit" CommandArgument='<%#Eval("id") %>' OnClick="btn_edit_Click">编辑</asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                    <div class="alert" id="div_nodata" runat="server">
                        <i class="icon-warning-sign"></i>
                        暂无数据
                    </div>
                    <webdiyer:AspNetPager ID="anp" runat="server" CustomInfoHTML="总计%RecordCount%条记录"
                        FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" OnPageChanged="anp_PageChanged"
                        PrevPageText="上一页" ShowCustomInfoSection="Left" ShowPageIndexBox="Never" PageSize="20"
                        CssClass="paginator" CurrentPageButtonClass="cpb" AlwaysShow="True" CustomInfoSectionWidth="250px">
                    </webdiyer:AspNetPager>
                </div>
            </div>
        </div>

    </div>
    <!--新增/修改模态窗口-->
    <div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h3 id="myModalLabel" class="xunyue_myModalLabel" runat="server">录入数据</h3>
        </div>
        <div class="modal-body">
            <div class="control-group">
                <!-- Select Basic -->
                <label class="control-label">请选择月份：</label>
                <div class="controls">
                    <asp:DropDownList runat="server" ID="ddl_month" ClientIDMode="Static">
                        <asp:ListItem Text="1" Value="01" />
                        <asp:ListItem Text="2" Value="02" />
                        <asp:ListItem Text="3" Value="03" />
                        <asp:ListItem Text="4" Value="04" />
                        <asp:ListItem Text="5" Value="05" />
                        <asp:ListItem Text="6" Value="06" />
                        <asp:ListItem Text="7" Value="07" />
                        <asp:ListItem Text="8" Value="08" />
                        <asp:ListItem Text="9" Value="09" />
                        <asp:ListItem Text="10" Value="10" />
                        <asp:ListItem Text="11" Value="11" />
                        <asp:ListItem Text="12" Value="12" />
                    </asp:DropDownList>
                </div>
            </div>
            <div class="control-group">
                <!-- Select Basic -->
                <label class="control-label">请选择类别</label>
                <div class="controls">
                    <asp:DropDownList runat="server" ID="ddl_type" ClientIDMode="Static">
                        <asp:ListItem Text="上旬" Value="01" />
                        <asp:ListItem Text="中旬" Value="02" />
                        <asp:ListItem Text="下旬" Value="03" />
                        <asp:ListItem Text="全月" Value="00" />
                    </asp:DropDownList>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">请输入内容</label>
                <div class="controls">
                    <div class="textarea">
                        <asp:TextBox runat="server" ID="txt_content" TextMode="MultiLine" Rows="4" ClientIDMode="Static" Width="600" />
                    </div>
                </div>
            </div>

            <input type="hidden" runat="server" id="ID" class="xy_ID" />
            <input type="hidden" runat="server" id="xy_type" class="xy_type" />
        </div>

        <div class="modal-footer">
            <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
            <asp:Button runat="server" ID="btn_save" ClientIDMode="Static" CssClass="btn btn-primary xunyue_btn_save" OnClick="btn_save_Click" Text="保存" />
        </div>
    </div>
    <!--导入-->
    <div id="modal_import" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h3 id="H1" class="xunyue_myModalLabel" runat="server">录入数据</h3>
        </div>
        <div class="modal-body">
            <div class="modal-body">
                <div style="display: inline-block; float: left">
                    <asp:FileUpload runat="server" ID="file" />
                </div>
            </div>
        </div>
        <div class="modal-footer">
            <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
            <asp:Button runat="server" ID="btn_import" ClientIDMode="Static" CssClass="btn btn-primary" OnClick="btn_import_Click" Text="保存" />
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="home_script" runat="server">
    <script type="text/javascript">
        $("input[type='checkbox']").css("margin-top", "10px");
        //后台调用方法

        $("#btn_add_").click(function () {
            $("#txt_content").val("");
        })

    </script>
</asp:Content>
